package AST;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class SimpleStmt extends Stmt {
	private List<SmallStmt> smallStmtList= new ArrayList<SmallStmt>();

	public SimpleStmt(List<SmallStmt> smallStmtList) {
		print();
		this.smallStmtList = smallStmtList;
	}

	public SimpleStmt() {
		print();
	}

	public List<SmallStmt> getSmallStmtList() {
		return smallStmtList;
	}

	public void setSmallStmtList(List<SmallStmt> smallStmtList) {
		this.smallStmtList = smallStmtList;
	}

	public void print() {
		System.out.println("SimpleStmt");
	}

	public void genC(PW pw) {
		Iterator<SmallStmt> itSmall = smallStmtList.iterator();

		itSmall.next().genC(pw);
		while (itSmall.hasNext()) {
			pw.print(";");
			itSmall.next().genC(pw);
		}
		pw.print("\n");

	}

}
